![]() |
WOLF core
WOLF: A Modular Estimation Framework for Robotics
|
Wolf problem: root of the wolf tree (hardware, trajectory and map). It manages the motion providers, the first frame, the keyframe callbacks, the covariances and the notifications to the solver manager. More...
#include <core/problem/problem.h>
Public Member Functions | |
| virtual | ~Problem () |
| Destructor. More... | |
| LoaderPtr | getLoader () |
| Returns the plugin loader. More... | |
| SizeEigen | getDim () const |
| Returns the dimension of the problem (2 or 3) More... | |
| TypeComposite | getFrameTypes (StateKeys _keys) const |
| Returns the frame state types of some keys. More... | |
| void | setTreeManager (TreeManagerBasePtr _gm) |
| Sets the tree manager. More... | |
| TreeManagerBaseConstPtr | getTreeManager () const |
| Returns the tree manager. More... | |
| TreeManagerBasePtr | getTreeManager () |
| Returns the tree manager. More... | |
| HardwareBaseConstPtr | getHardware () const |
| Returns the hardware branch. More... | |
| HardwareBasePtr | getHardware () |
| Returns the hardware branch. More... | |
| SensorBasePtr | installSensor (YAML::Node _sensor_node, std::vector< std::string > _schema_folders={}) |
| Installs a sensor (creates it and links it to the hardware) from a YAML node, loading its plugin if needed. More... | |
| SensorBasePtr | installSensor (const std::string &_params_yaml_filename, std::vector< std::string > _schema_folders) |
| Installs a sensor (creates it and links it to the hardware) from a YAML file. More... | |
| ProcessorBasePtr | installProcessor (YAML::Node _processor_node, std::vector< std::string > _schema_folders={}) |
| Installs a processor (creates it and links it to the sensor named in 'sensor_name') from a YAML node, loading its plugin if needed. More... | |
| ProcessorBasePtr | installProcessor (SensorBasePtr _sensor_corresponding, const std::string &_params_yaml_filename, std::vector< std::string > _schema_folders) |
| Installs a processor (creates it and links it to the given sensor) from a YAML file. More... | |
| ProcessorBasePtr | installProcessor (const std::string &_params_yaml_filename, std::vector< std::string > _schema_folders) |
| Installs a processor (creates it and links it to the sensor named in 'sensor_name') from a YAML file. More... | |
| SensorBaseConstPtr | findSensor (const std::string &_sensor_name) const |
| Returns the sensor with a given name (nullptr if not found) More... | |
| SensorBasePtr | findSensor (const std::string &_sensor_name) |
| Returns the sensor with a given name (nullptr if not found) More... | |
| ProcessorBaseConstPtr | findProcessor (const std::string &_processor_name) const |
| Returns the processor with a given name (nullptr if not found) More... | |
| ProcessorBasePtr | findProcessor (const std::string &_processor_name) |
| Returns the processor with a given name (nullptr if not found) More... | |
| std::map< unsigned int, MotionProviderConstPtr > | getMotionProviderMap () const |
| Returns the motion providers indexed by their order. More... | |
| std::map< unsigned int, MotionProviderPtr > | getMotionProviderMap () |
| Returns the motion providers indexed by their order. More... | |
| TrajectoryBaseConstPtr | getTrajectory () const |
| Returns the trajectory branch. More... | |
| TrajectoryBasePtr | getTrajectory () |
| Returns the trajectory branch. More... | |
| bool | isFirstFrameSpecified () const |
| Returns whether the first frame options have been set. More... | |
| bool | isFirstFrameApplied () const |
| Returns whether the first frame options have been applied (first frame emplaced) More... | |
| void | setFirstFrameOptions (const YAML::Node &_first_frame_node) |
| Sets the first frame options (types, values and priors) from a YAML node. More... | |
| void | setFirstFrameOptions (const TypeComposite &_first_frame_types, const VectorComposite &_first_frame_values, const PriorComposite &_first_frame_priors) |
| Sets the first frame options: types, values and priors. More... | |
| FrameBasePtr | applyFirstFrameOptions (const TimeStamp &_ts) |
| Emplaces the first frame at _ts with the first frame options and calls the keyframe callback (only once) More... | |
| FrameBasePtr | emplaceFirstFrame (const TimeStamp &_ts, const YAML::Node &_first_frame_node) |
| Sets the first frame options from a YAML node and applies them. More... | |
| FrameBasePtr | emplaceFirstFrame (const TimeStamp &_ts, const TypeComposite &_first_frame_types, const VectorComposite &_first_frame_values, const PriorComposite &_first_frame_priors) |
| Sets the first frame options and applies them. More... | |
| FrameBasePtr | emplaceFrame (const TimeStamp &_time_stamp, const TypeComposite &_frame_types, const VectorComposite &_frame_state, const PriorComposite &_frame_priors={}) |
| Emplaces a frame from time stamp, types and state (adding the types to the problem) More... | |
| FrameBasePtr | emplaceFrame (const TimeStamp &_time_stamp, const StateKeys &_frame_keys) |
| Emplaces a frame from time stamp and keys. More... | |
| FrameBasePtr | emplaceFrame (const TimeStamp &_time_stamp, const VectorComposite &_frame_state) |
| Emplaces a frame from time stamp and state. More... | |
| FrameBasePtr | emplaceFrame (const TimeStamp &_time_stamp, const StateKeys &_frame_keys, const Eigen::VectorXd &_frame_state) |
| Emplaces a frame from time stamp and state vector. More... | |
| void | emplaceStatesToFrame (FrameBasePtr _frame_ptr, const StateKeys &_frame_keys) |
| Emplaces the missing states to a frame, with its time stamp. More... | |
| void | emplaceStatesToFrame (FrameBasePtr _frame_ptr, const VectorComposite &_frame_states) |
| Emplaces the missing states to a frame. More... | |
| FrameBaseConstPtr | getLastFrame () const |
| Returns the last frame of the trajectory. More... | |
| FrameBasePtr | getLastFrame () |
| Returns the last frame of the trajectory. More... | |
| FrameBaseConstPtr | closestFrameToTimeStamp (const TimeStamp &_ts) const |
| Returns the frame of the trajectory closest to a time stamp. More... | |
| FrameBasePtr | closestFrameToTimeStamp (const TimeStamp &_ts) |
| Returns the frame of the trajectory closest to a time stamp. More... | |
| bool | permitKeyFrame (ProcessorBaseConstPtr _processor_ptr) const |
| Give the permission to a processor to create a new key Frame. More... | |
| void | keyFrameCallback (FrameBasePtr _keyframe_ptr, ProcessorBasePtr _processor_ptr) |
| New keyframe callback. More... | |
| TimeStamp | getTimeStamp () const |
| Returns the most recent time stamp of the motion providers (or of the last frame if none) More... | |
| VectorComposite | getState (const StateKeys &_keys) const |
| Returns the current state of some keys, from the motion providers by order (completed with the last frame, the first frame options or zero) More... | |
| VectorComposite | getState (const TimeStamp &_ts, const StateKeys &_keys) const |
| Returns the state of some keys at a time stamp, from the motion providers by order (completed with the closest frame, the first frame options or zero) More... | |
| VectorComposite | getOdometry (const StateKeys &_keys) const |
| Returns the odometry of some keys, from the motion providers by order. More... | |
| VectorComposite | stateZero (TypeComposite _types) const |
| Returns the zero (identity) state of some state types. More... | |
| VectorComposite | stateZero (const StateKeys &_keys) const |
| Returns the zero (identity) state of some keys, with the frame state types. More... | |
| MapBaseConstPtr | getMap () const |
| Returns the map branch. More... | |
| MapBasePtr | getMap () |
| Returns the map branch. More... | |
| void | setMap (MapBasePtr) |
| Sets the map branch. More... | |
| bool | saveMap (const std::string &_filename_dot_yaml, const std::string &_map_name="Map automatically saved by Wolf") |
| Saves the map to a YAML file. Returns whether it succeeded. More... | |
| void | perturb (double amplitude=0.01) |
| Perturbs the non-fixed state blocks of all nodes with random noise following a uniform distribution in [-amplitude, amplitude] (in the tangent space) More... | |
| void | transform (const VectorComposite &_transformation) |
| Transforms all the states of sensors, frames, captures and landmarks with a transformation. More... | |
| bool | isTransformed () const |
| Returns whether the problem has been transformed (see transform()) More... | |
| void | resetTransformed () |
| Resets the transformed flag. More... | |
| VectorComposite | getTransformation () const |
| Returns the last transformation applied to the problem. More... | |
| void | clearCovariance () |
| Clears all the covariance blocks. More... | |
| void | addCovarianceBlock (StateBlockPtr _state1, StateBlockPtr _state2, const Eigen::MatrixXd &_cov) |
| Stores the cross-covariance block between two state blocks. More... | |
| void | addCovarianceBlock (StateBlockPtr _state1, const Eigen::MatrixXd &_cov) |
| Stores the covariance block of a state block. More... | |
| bool | getCovarianceBlock (StateBlockConstPtr _state1, StateBlockConstPtr _state2, Eigen::MatrixXd &_cov, const int _row=0, const int _col=0) const |
| Gets the cross-covariance block between two state blocks into _cov at (_row, _col). Returns whether it was found. More... | |
| bool | getCovarianceBlock (std::map< StateBlockConstPtr, unsigned int > _sb_2_idx, Eigen::MatrixXd &_cov) const |
| Gets the covariance blocks of several state blocks into _cov, at the indices of _sb_2_idx. Returns whether all were found. More... | |
| bool | getCovarianceBlock (StateBlockConstPtr _state, Eigen::MatrixXd &_cov, const int _row_and_col=0) const |
| Gets the covariance block of a state block into _cov at (_row_and_col, _row_and_col). Returns whether it was found. More... | |
| bool | getCovariance (NodeStateBlocksConstPtr _has_states_ptr, const StateKeys &_keys, Eigen::MatrixXd &_covariance) const |
| Gets the covariance of some keys of a node. Returns whether all blocks were found. More... | |
| bool | getLastFrameCovariance (const StateKeys &_keys, Eigen::MatrixXd &_covariance) const |
| Gets the covariance of some keys of the last frame. Returns whether all blocks were found. More... | |
| StateBlockPtr | notifyStateBlock (StateBlockPtr _state_ptr, Notification _notif) |
| Notifies a new/removed state block to update the solver manager (opposite pending notifications cancel out) More... | |
| SizeStd | getStateBlockNotificationMapSize () const |
| Returns the size of the map of state block notification. More... | |
| bool | getStateBlockNotification (const StateBlockPtr &sb_ptr, Notification ¬if) const |
| Returns whether the state block has been notified, and the notification via parameter. More... | |
| FactorBasePtr | notifyFactor (FactorBasePtr _factor_ptr, Notification _notif) |
| Notifies a new/removed factor to update the solver manager (opposite pending notifications cancel out) More... | |
| SizeStd | getFactorNotificationMapSize () const |
| Returns the size of the map of factor notification. More... | |
| bool | getFactorNotification (const FactorBasePtr &fac_ptr, Notification ¬if) const |
| Returns whether the factor has been notified, and the notification via parameter. More... | |
| void | print (int depth=4, bool factored_by=false, bool metric=true, bool state_blocks=false, std::ostream &stream=std::cout) const |
| Prints the wolf tree. More... | |
| bool | check (int verbose_level=0) const |
| Checks the consistency of the wolf tree, printing the result if verbose_level > 0. More... | |
| bool | check (bool verbose, std::ostream &stream) const |
| Checks the consistency of the wolf tree, optionally printing the result to a stream. More... | |
Static Public Member Functions | |
| static ProblemPtr | create (SizeEigen _dim, const TypeComposite &_frame_types={}, LoaderPtr _loader=nullptr) |
| Creates a problem from the dimension, the frame types and the plugin loader (use this as a constructor) More... | |
| static ProblemPtr | autoSetup (const std::string &_input_yaml_file, std::vector< std::string > _primary_schema_folders={}, LoaderPtr _loader=nullptr, bool _skip_yaml_validation=false) |
| Creates a problem from a YAML file (see the YAML node version) More... | |
| static ProblemPtr | autoSetup (YAML::Node _param_node, std::vector< std::string > _primary_schema_folders={}, LoaderPtr _loader=nullptr, bool _skip_yaml_validation=false) |
| Creates a problem from a YAML node, validated against the schemas (unless skipped): first frame options, tree manager, sensors, processors and map. More... | |
Protected Member Functions | |
| void | addFrameTypes (const TypeComposite &_types) |
| Adds frame state types, checking that existing keys have the same type. More... | |
| void | addMotionProvider (MotionProviderPtr _processor_motion_ptr) |
| Adds a motion provider to the motion providers (only if it is a state provider), by its order. More... | |
| void | removeMotionProvider (MotionProviderPtr proc) |
| Removes a motion provider. More... | |
| void | consumeNotifications (std::map< StateBlockPtr, Notification > &, std::map< FactorBasePtr, Notification > &) |
| Moves the state block and factor notifications to the given maps, to be handled by the solver (the maps stored in this are emptied) More... | |
| std::map< StateBlockPtr, Notification > | consumeStateBlockNotificationMap () |
| Returns the map of state block notification to be handled by the solver (the map stored in this is emptied). Declared but not implemented: use consumeNotifications() More... | |
| std::map< FactorBasePtr, Notification > | consumeFactorNotificationMap () |
| Returns the map of factor notification to be handled by the solver (the map stored in this is emptied). Declared but not implemented: use consumeNotifications() More... | |
Protected Attributes | |
| HardwareBasePtr | hardware_ptr_ |
| Hardware branch: the sensors and their processors. More... | |
| TrajectoryBasePtr | trajectory_ptr_ |
| Trajectory branch: the frames. More... | |
| MapBasePtr | map_ptr_ |
| Map branch: the landmarks. More... | |
| TreeManagerBasePtr | tree_manager_ |
| Tree manager. More... | |
| std::map< unsigned int, MotionProviderPtr > | motion_provider_map_ |
| Motion providers indexed by their order. More... | |
| SizeEigen | dim_ |
| Dimension of the problem (2 or 3) More... | |
| TypeComposite | frame_types_ |
| State types of the frames. More... | |
| VectorComposite | first_frame_values_ |
| State values of the first frame. More... | |
| PriorComposite | first_frame_priors_ |
| State priors of the first frame. More... | |
| unsigned int | first_frame_status_ |
| 0: not set, 1: set, 2: applied More... | |
| std::map< std::pair< StateBlockConstPtr, StateBlockConstPtr >, Eigen::MatrixXd > | covariances_ |
| Covariance blocks, indexed by pairs of state blocks. More... | |
| std::map< FactorBasePtr, Notification > | factor_notification_map_ |
| Pending notifications to the solver. More... | |
| std::map< StateBlockPtr, Notification > | state_block_notification_map_ |
| Pending notifications to the solver. More... | |
| std::mutex | mut_notifications_ |
| Mutex of the notification maps. More... | |
| std::mutex | mut_covariances_ |
| Mutex of the covariances. More... | |
| std::atomic_bool | transformed_ |
| Whether the problem has been transformed (see transform()) More... | |
| VectorComposite | transformation_ |
| Last transformation applied to the problem. More... | |
| std::mutex | mut_transform_ |
| Mutex of the transformation. More... | |
| LoaderPtr | loader_ |
| Loader of the plugins. More... | |
Wolf problem: root of the wolf tree (hardware, trajectory and map). It manages the motion providers, the first frame, the keyframe callbacks, the covariances and the notifications to the solver manager.
|
virtual |
Destructor.
| void wolf::Problem::addCovarianceBlock | ( | StateBlockPtr | _state1, |
| const Eigen::MatrixXd & | _cov | ||
| ) |
Stores the covariance block of a state block.
| void wolf::Problem::addCovarianceBlock | ( | StateBlockPtr | _state1, |
| StateBlockPtr | _state2, | ||
| const Eigen::MatrixXd & | _cov | ||
| ) |
Stores the cross-covariance block between two state blocks.
|
protected |
Adds frame state types, checking that existing keys have the same type.
|
protected |
Adds a motion provider to the motion providers (only if it is a state provider), by its order.
| FrameBasePtr wolf::Problem::applyFirstFrameOptions | ( | const TimeStamp & | _ts | ) |
Emplaces the first frame at _ts with the first frame options and calls the keyframe callback (only once)
|
static |
|
static |
Creates a problem from a YAML node, validated against the schemas (unless skipped): first frame options, tree manager, sensors, processors and map.
| bool wolf::Problem::check | ( | bool | verbose, |
| std::ostream & | stream | ||
| ) | const |
Checks the consistency of the wolf tree, optionally printing the result to a stream.
| bool wolf::Problem::check | ( | int | verbose_level = 0 | ) | const |
Checks the consistency of the wolf tree, printing the result if verbose_level > 0.
| void wolf::Problem::clearCovariance | ( | ) |
Clears all the covariance blocks.
| FrameBasePtr wolf::Problem::closestFrameToTimeStamp | ( | const TimeStamp & | _ts | ) |
Returns the frame of the trajectory closest to a time stamp.
| FrameBaseConstPtr wolf::Problem::closestFrameToTimeStamp | ( | const TimeStamp & | _ts | ) | const |
Returns the frame of the trajectory closest to a time stamp.
|
protected |
Returns the map of factor notification to be handled by the solver (the map stored in this is emptied). Declared but not implemented: use consumeNotifications()
|
inlineprotected |
Moves the state block and factor notifications to the given maps, to be handled by the solver (the maps stored in this are emptied)
|
protected |
Returns the map of state block notification to be handled by the solver (the map stored in this is emptied). Declared but not implemented: use consumeNotifications()
|
static |
Creates a problem from the dimension, the frame types and the plugin loader (use this as a constructor)
| FrameBasePtr wolf::Problem::emplaceFirstFrame | ( | const TimeStamp & | _ts, |
| const TypeComposite & | _first_frame_types, | ||
| const VectorComposite & | _first_frame_values, | ||
| const PriorComposite & | _first_frame_priors | ||
| ) |
Sets the first frame options and applies them.
| FrameBasePtr wolf::Problem::emplaceFirstFrame | ( | const TimeStamp & | _ts, |
| const YAML::Node & | _first_frame_node | ||
| ) |
Sets the first frame options from a YAML node and applies them.
| FrameBasePtr wolf::Problem::emplaceFrame | ( | const TimeStamp & | _time_stamp, |
| const StateKeys & | _frame_keys | ||
| ) |
Emplaces a frame from time stamp and keys.
| _time_stamp | Time stamp of the frame |
| _frame_keys | String containing the keys of the desired frame. |
This acts as a Frame factory, but also takes care to update related lists in WolfProblem:
| FrameBasePtr wolf::Problem::emplaceFrame | ( | const TimeStamp & | _time_stamp, |
| const StateKeys & | _frame_keys, | ||
| const Eigen::VectorXd & | _frame_state | ||
| ) |
Emplaces a frame from time stamp and state vector.
| _time_stamp | Time stamp of the frame |
| _frame_keys | String containing the keys of the desired frame. |
| _frame_state | State vector; must match the size and format of the chosen frame state_keys |
This acts as a Frame factory, but also takes care to update related lists in WolfProblem:
| FrameBasePtr wolf::Problem::emplaceFrame | ( | const TimeStamp & | _time_stamp, |
| const TypeComposite & | _frame_types, | ||
| const VectorComposite & | _frame_state, | ||
| const PriorComposite & | _frame_priors = {} |
||
| ) |
Emplaces a frame from time stamp, types and state (adding the types to the problem)
| _time_stamp | Time stamp of the frame |
| _frame_types | TypeComposite indicating the types of each key. |
| _frame_state | VectorComposite with the states |
| _frame_priors | PriorComposite with the priors on the states (not all keys required) |
This acts as a Frame factory, but also takes care to update related lists in WolfProblem:
| FrameBasePtr wolf::Problem::emplaceFrame | ( | const TimeStamp & | _time_stamp, |
| const VectorComposite & | _frame_state | ||
| ) |
Emplaces a frame from time stamp and state.
| _time_stamp | Time stamp of the frame |
| _frame_state | State; must be part of the problem's frame state_keys |
This acts as a Frame factory, but also takes care to update related lists in WolfProblem:
| void wolf::Problem::emplaceStatesToFrame | ( | FrameBasePtr | _frame_ptr, |
| const StateKeys & | _frame_keys | ||
| ) |
Emplaces the missing states to a frame, with its time stamp.
| _frame_ptr | Frame to which states have to be emplaced |
| _frame_keys | the keys that the frame is requested to have. |
| void wolf::Problem::emplaceStatesToFrame | ( | FrameBasePtr | _frame_ptr, |
| const VectorComposite & | _frame_states | ||
| ) |
Emplaces the missing states to a frame.
| _frame_ptr | Frame to which states have to be emplaced |
| _frame_states | the states vectors to be added to the frame |
| ProcessorBasePtr wolf::Problem::findProcessor | ( | const std::string & | _processor_name | ) |
Returns the processor with a given name (nullptr if not found)
| ProcessorBaseConstPtr wolf::Problem::findProcessor | ( | const std::string & | _processor_name | ) | const |
Returns the processor with a given name (nullptr if not found)
| _processor_name | The processor name, as it was installed with installProcessor() |
| SensorBasePtr wolf::Problem::findSensor | ( | const std::string & | _sensor_name | ) |
Returns the sensor with a given name (nullptr if not found)
| SensorBaseConstPtr wolf::Problem::findSensor | ( | const std::string & | _sensor_name | ) | const |
Returns the sensor with a given name (nullptr if not found)
| _sensor_name | The sensor name, as it was installed with installSensor() |
| bool wolf::Problem::getCovariance | ( | NodeStateBlocksConstPtr | _has_states_ptr, |
| const StateKeys & | _keys, | ||
| Eigen::MatrixXd & | _covariance | ||
| ) | const |
Gets the covariance of some keys of a node. Returns whether all blocks were found.
| bool wolf::Problem::getCovarianceBlock | ( | StateBlockConstPtr | _state, |
| Eigen::MatrixXd & | _cov, | ||
| const int | _row_and_col = 0 |
||
| ) | const |
Gets the covariance block of a state block into _cov at (_row_and_col, _row_and_col). Returns whether it was found.
| bool wolf::Problem::getCovarianceBlock | ( | StateBlockConstPtr | _state1, |
| StateBlockConstPtr | _state2, | ||
| Eigen::MatrixXd & | _cov, | ||
| const int | _row = 0, |
||
| const int | _col = 0 |
||
| ) | const |
Gets the cross-covariance block between two state blocks into _cov at (_row, _col). Returns whether it was found.
| bool wolf::Problem::getCovarianceBlock | ( | std::map< StateBlockConstPtr, unsigned int > | _sb_2_idx, |
| Eigen::MatrixXd & | _cov | ||
| ) | const |
Gets the covariance blocks of several state blocks into _cov, at the indices of _sb_2_idx. Returns whether all were found.
| SizeEigen wolf::Problem::getDim | ( | ) | const |
Returns the dimension of the problem (2 or 3)
| bool wolf::Problem::getFactorNotification | ( | const FactorBasePtr & | fac_ptr, |
| Notification & | notif | ||
| ) | const |
Returns whether the factor has been notified, and the notification via parameter.
|
inline |
Returns the size of the map of factor notification.
| TypeComposite wolf::Problem::getFrameTypes | ( | StateKeys | _keys | ) | const |
Returns the frame state types of some keys.
| HardwareBasePtr wolf::Problem::getHardware | ( | ) |
Returns the hardware branch.
| HardwareBaseConstPtr wolf::Problem::getHardware | ( | ) | const |
Returns the hardware branch.
| FrameBasePtr wolf::Problem::getLastFrame | ( | ) |
Returns the last frame of the trajectory.
| FrameBaseConstPtr wolf::Problem::getLastFrame | ( | ) | const |
Returns the last frame of the trajectory.
| bool wolf::Problem::getLastFrameCovariance | ( | const StateKeys & | _keys, |
| Eigen::MatrixXd & | _covariance | ||
| ) | const |
Gets the covariance of some keys of the last frame. Returns whether all blocks were found.
|
inline |
Returns the plugin loader.
| MapBasePtr wolf::Problem::getMap | ( | ) |
Returns the map branch.
| MapBaseConstPtr wolf::Problem::getMap | ( | ) | const |
Returns the map branch.
|
inline |
Returns the motion providers indexed by their order.
|
inline |
Returns the motion providers indexed by their order.
| VectorComposite wolf::Problem::getOdometry | ( | const StateKeys & | _keys | ) | const |
Returns the odometry of some keys, from the motion providers by order.
| VectorComposite wolf::Problem::getState | ( | const StateKeys & | _keys | ) | const |
Returns the current state of some keys, from the motion providers by order (completed with the last frame, the first frame options or zero)
| VectorComposite wolf::Problem::getState | ( | const TimeStamp & | _ts, |
| const StateKeys & | _keys | ||
| ) | const |
Returns the state of some keys at a time stamp, from the motion providers by order (completed with the closest frame, the first frame options or zero)
| bool wolf::Problem::getStateBlockNotification | ( | const StateBlockPtr & | sb_ptr, |
| Notification & | notif | ||
| ) | const |
Returns whether the state block has been notified, and the notification via parameter.
|
inline |
Returns the size of the map of state block notification.
| TimeStamp wolf::Problem::getTimeStamp | ( | ) | const |
Returns the most recent time stamp of the motion providers (or of the last frame if none)
| TrajectoryBasePtr wolf::Problem::getTrajectory | ( | ) |
Returns the trajectory branch.
| TrajectoryBaseConstPtr wolf::Problem::getTrajectory | ( | ) | const |
Returns the trajectory branch.
| VectorComposite wolf::Problem::getTransformation | ( | ) | const |
Returns the last transformation applied to the problem.
|
inline |
Returns the tree manager.
|
inline |
Returns the tree manager.
| ProcessorBasePtr wolf::Problem::installProcessor | ( | const std::string & | _params_yaml_filename, |
| std::vector< std::string > | _schema_folders | ||
| ) |
| ProcessorBasePtr wolf::Problem::installProcessor | ( | SensorBasePtr | _sensor_corresponding, |
| const std::string & | _params_yaml_filename, | ||
| std::vector< std::string > | _schema_folders | ||
| ) |
Installs a processor (creates it and links it to the given sensor) from a YAML file.
| _sensor_corresponding | corresponding sensor pointer, used to bind the processor to the particular instance of the sensor |
| _params_yaml_filename | name of formatted yaml file defining the processor parameters. |
| _schema_folders | a vector of paths where the schema files (to validate the YAML file) are placed |
| ProcessorBasePtr wolf::Problem::installProcessor | ( | YAML::Node | _processor_node, |
| std::vector< std::string > | _schema_folders = {} |
||
| ) |
Installs a processor (creates it and links it to the sensor named in 'sensor_name') from a YAML node, loading its plugin if needed.
| SensorBasePtr wolf::Problem::installSensor | ( | const std::string & | _params_yaml_filename, |
| std::vector< std::string > | _schema_folders | ||
| ) |
| SensorBasePtr wolf::Problem::installSensor | ( | YAML::Node | _sensor_node, |
| std::vector< std::string > | _schema_folders = {} |
||
| ) |
Installs a sensor (creates it and links it to the hardware) from a YAML node, loading its plugin if needed.
|
inline |
Returns whether the first frame options have been applied (first frame emplaced)
|
inline |
Returns whether the first frame options have been set.
| bool wolf::Problem::isTransformed | ( | ) | const |
Returns whether the problem has been transformed (see transform())
| void wolf::Problem::keyFrameCallback | ( | FrameBasePtr | _keyframe_ptr, |
| ProcessorBasePtr | _processor_ptr | ||
| ) |
New keyframe callback.
It should be called by any processor that creates a new keyframe. It calls the keyFrameCallback() of the rest of processors and of the tree manager.
| FactorBasePtr wolf::Problem::notifyFactor | ( | FactorBasePtr | _factor_ptr, |
| Notification | _notif | ||
| ) |
Notifies a new/removed factor to update the solver manager (opposite pending notifications cancel out)
| StateBlockPtr wolf::Problem::notifyStateBlock | ( | StateBlockPtr | _state_ptr, |
| Notification | _notif | ||
| ) |
Notifies a new/removed state block to update the solver manager (opposite pending notifications cancel out)
| bool wolf::Problem::permitKeyFrame | ( | ProcessorBaseConstPtr | _processor_ptr | ) | const |
Give the permission to a processor to create a new key Frame.
This should implement a black list of processors that have forbidden key frame creation.
| void wolf::Problem::perturb | ( | double | amplitude = 0.01 | ) |
Perturbs the non-fixed state blocks of all nodes with random noise following a uniform distribution in [-amplitude, amplitude] (in the tangent space)
| void wolf::Problem::print | ( | int | depth = 4, |
| bool | factored_by = false, |
||
| bool | metric = true, |
||
| bool | state_blocks = false, |
||
| std::ostream & | stream = std::cout |
||
| ) | const |
Prints the wolf tree.
| depth | levels to show ( 0: H, T, M : 1: H:S, T:F, M:L ; 2: H:S:p, T:F:C ; 3: T:F:C:f ; 4: T:F:C:f:c ) |
| factored_by | show factors pointing to F, C, f and L. |
| metric | show metric info (status, time stamps, state vectors, measurements) |
| state_blocks | show state blocks |
|
protected |
Removes a motion provider.
| void wolf::Problem::resetTransformed | ( | ) |
Resets the transformed flag.
| bool wolf::Problem::saveMap | ( | const std::string & | _filename_dot_yaml, |
| const std::string & | _map_name = "Map automatically saved by Wolf" |
||
| ) |
Saves the map to a YAML file. Returns whether it succeeded.
| void wolf::Problem::setFirstFrameOptions | ( | const TypeComposite & | _first_frame_types, |
| const VectorComposite & | _first_frame_values, | ||
| const PriorComposite & | _first_frame_priors | ||
| ) |
Sets the first frame options: types, values and priors.
| void wolf::Problem::setFirstFrameOptions | ( | const YAML::Node & | _first_frame_node | ) |
Sets the first frame options (types, values and priors) from a YAML node.
| void wolf::Problem::setMap | ( | MapBasePtr | _map_ptr | ) |
Sets the map branch.
| void wolf::Problem::setTreeManager | ( | TreeManagerBasePtr | _gm | ) |
Sets the tree manager.
| VectorComposite wolf::Problem::stateZero | ( | const StateKeys & | _keys | ) | const |
Returns the zero (identity) state of some keys, with the frame state types.
| VectorComposite wolf::Problem::stateZero | ( | TypeComposite | _types | ) | const |
Returns the zero (identity) state of some state types.
| void wolf::Problem::transform | ( | const VectorComposite & | _transformation | ) |
Transforms all the states of sensors, frames, captures and landmarks with a transformation.
|
protected |
Covariance blocks, indexed by pairs of state blocks.
|
protected |
Dimension of the problem (2 or 3)
|
protected |
Pending notifications to the solver.
|
protected |
State priors of the first frame.
|
protected |
0: not set, 1: set, 2: applied
|
protected |
State values of the first frame.
|
protected |
State types of the frames.
|
protected |
Hardware branch: the sensors and their processors.
|
protected |
Map branch: the landmarks.
|
protected |
Motion providers indexed by their order.
|
mutableprotected |
Mutex of the covariances.
|
mutableprotected |
Mutex of the notification maps.
|
mutableprotected |
Mutex of the transformation.
|
protected |
Pending notifications to the solver.
|
protected |
Trajectory branch: the frames.
|
protected |
Last transformation applied to the problem.
|
protected |
Whether the problem has been transformed (see transform())
|
protected |
Tree manager.